﻿using Bricks.Component.Utils;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Bricks.Site.Models.DBViewModel.Expense
{
    /// <summary>
    /// 工程清单计量汇总表（支表三）
    /// 罗泽新 20150427
    /// </summary>
    public class VMExpenseThird
    {
        public string KeyID { get; set; }

        public string ProjectName { get; set; }

        public string ContractNo { get; set; }

        public string LastDate { get; set; }

        public string ExpenseNo { get; set; }

        public string BuildUnit { get; set; }

        public string SupervisionUnit { get; set; }

        public string Contractor { get; set; }

        public string SupervisionEngineer { get; set; }

        public string ProjectOffice { get; set; }
    }

    /// <summary>
    /// 支表三明细列表
    /// 罗泽新 20150427
    /// </summary>
    public class VMExpenseThirdList
    {
        public string ID { get; set; }

        public string SectionID { get; set; }

        public string PeriodID { get; set; }

        public string ListNo { get; set; }

        public string ListName { get; set; }

        public string Unit { get; set; }

        public decimal? Price { get; set; }

        public decimal? ContractCount { get; set; }

        public decimal? ContractMoney { get; set; }

        public decimal? BuildPaperCount { get; set; }

        public decimal? BuildPaperMoney { get; set; }

        public decimal? ChangeCount { get; set; }

        public decimal? ChangeMoney { get; set; }

        public decimal? ThisPeriodTotalFinishCount { get; set; }

        public decimal? ThisPeriodTotalFinishMoney { get; set; }

        public decimal? PreviousPeriodTotalFinishCount { get; set; }

        public decimal? PreviousPeriodTotalFinishMoney { get; set; }

        public decimal? ThisPeriodFinishCount { get; set; }

        public decimal? ThisPeriodFinishMoney { get; set; }
    }

    /// <summary>
    /// 演示数据
    /// 罗泽新 20150427
    /// </summary>
    public class VMExpenseThirdDemoData
    {
        //private string id;

        //public VMExpenseThirdDemoData()
        //{
        //    id = GuidHelper.NewGuid().ToString();
        //}

        public VMExpenseThird GetVMExpenseThird(string keyID)
        {
            //keyID = id;

            VMExpenseThird result = new VMExpenseThird();
            result.KeyID = keyID;
            result.ProjectName = "项目名称";
            result.ContractNo = "合同编号";
            result.LastDate = "截止日期";
            result.ExpenseNo = "支付编号";
            result.BuildUnit = "施工单位";
            result.SupervisionUnit = "监理单位";
            result.Contractor = "承包人";
            result.SupervisionEngineer = "监理工程师";
            result.ProjectOffice = "项目办";
            return result;
        }

        public List<VMExpenseThirdList> GetVMExpenseThirdList(string sectionID, int periodID)
        {
            //keyID = id;  //测试关联

            List<VMExpenseThirdList> result = new List<VMExpenseThirdList>();
            VMExpenseThirdList newETL = null;
            for (int i = 0; i < 55; i++)
            {
                newETL = new VMExpenseThirdList();
                //newETL.ID = GuidHelper.NewGuid();
                //newETL.SectionID = sectionID;
                //newETL.PeriodID = periodID;
                //newETL.ListNo = "清单编号" + i;
                //newETL.ListName = "细目名称" + i;
                //newETL.Unit = "单位" + i;
                //newETL.Price = i;
                //newETL.ContractCount = i;
                //newETL.ContractMoney = i;
                //newETL.BuildPaperCount = i;
                //newETL.BuildPaperMoney = i;
                //newETL.ChangeCount = i;
                //newETL.ChangeMoney = i;
                //newETL.ThisPeriodTotalFinishCount = i;
                //newETL.ThisPeriodTotalFinishMoney = i;
                //newETL.PreviousPeriodTotalFinishCount = i;
                //newETL.PreviousPeriodTotalFinishMoney = i;
                //newETL.ThisPeriodFinishCount = i;
                //newETL.ThisPeriodFinishMoney = i;
                result.Add(newETL);
            }
            return result;
        }
    }
}
